package com.geek.activemq.jms;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 生产者
 */
@Component
public class JmsProducer {

    @Autowired
    private JmsTemplate template;

    public void sendMessage(String topic, Map message) {
        template.convertAndSend(topic, message);
    }

}
